﻿using System;
using System.Web;
using System.Web.Security;

public partial class ProductDebugATE_Index : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Check();
    }

    protected void Check()
    {
        if (HttpContext.Current != null)
        {
            if (Roles.IsUserInRole("Guest"))
            {
            }
            if (Roles.IsUserInRole("Operator"))
            {
            }
            if (Roles.IsUserInRole("Aginger"))
            {
            }
            if (Roles.IsUserInRole("Packer"))
            {
                this.P1.Visible = true;
                this.P2.Visible = true;
            }
            if (Roles.IsUserInRole("IT Engineer"))
            {
            }
            if (Roles.IsUserInRole("Quality Engineer"))
            {
                this.P1.Visible = true;
                this.P2.Visible = true;
            }
            if (Roles.IsUserInRole("Manager"))
            {
                this.P1.Visible = true;
                this.P2.Visible = true;
            }
            if (Roles.IsUserInRole("Administrators"))
            {
                this.P1.Visible = true;
                this.P2.Visible = true;
            }
        }
    }
}
